package com.soxing.webrain.brush.common.util;

import java.util.List;

public class MyFile {
	/**
	 * id
	 */
	private int id;
	/**
	 * 父id
	 */
	private int pid;
	/**
	 * 全路径
	 */
	private String entryName;
	/**
	 * 路径
	 */
	private String path;
	/**
	 * 父节点路径
	 */
	private String parentPath;
	/**
	 * 文件名
	 */
	private String fileName;
	/**
	 * 是否为文件夹
	 */
	private boolean dir;
	/**
	 * 大小
	 */
	private long size;
	/**
	 * 孩子节点
	 */
	private List<MyFile> childList;

	/**
	 * 服务器完整路径
	 */
	private String fullPath;


	public MyFile(String entryName, boolean dir, long size, String fullPath) {
		this.entryName = entryName;
		this.dir = dir;
		this.size = size;
		this.fullPath = fullPath;
	}

	public MyFile(String entryName, boolean dir, long size) {
		this.entryName = entryName;
		this.dir = dir;
		this.size = size;
	}

	public MyFile() {
	}

	public MyFile(int id, int pid, String path, String parentPath, String fileName) {
		this.id = id;
		this.pid = pid;
		this.path = path;
		this.parentPath = parentPath;
		this.fileName = fileName;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getParentPath() {
		return parentPath;
	}

	public void setParentPath(String parentPath) {
		this.parentPath = parentPath;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public boolean isDir() {
		return dir;
	}

	public void setDir(boolean dir) {
		this.dir = dir;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public List<MyFile> getChildList() {
		return childList;
	}

	public void setChildList(List<MyFile> childList) {
		this.childList = childList;
	}

	public String toString() {
		return "id:" + id + ",pid:" + pid + ",path:" + path + ",parentPath:" + parentPath + ",fileName:" + fileName
				+ ",dir:" + dir + ",size:" + size;
	}

	public String getEntryName() {
		return entryName;
	}

	public void setEntryName(String entryName) {
		this.entryName = entryName;
	}

	public String getFullPath() {
		return fullPath;
	}

	public void setFullPath(String fullPath) {
		this.fullPath = fullPath;
	}
}
